<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="_fragments :: head(~{::title})">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>标签</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
    <link rel="stylesheet" href="../static/css/home.min.css">
    <style>
        body{
            background: url("../static/images/bg.png");
        }

        .m-text{
            font-weight: 300 !important;
            letter-spacing: 1px !important;
            line-height: 1.5 !important;
            font-family: 宋体;
        }

         .m-black{
            color: #333 !important;
        }

        .m-margin-tiny{
            margin-top: 0.3em;
            margin-bottom: 0.3em;
        }
    </style>
</head>
<body>
    <!-- 首页 -->
    <nav th:replace="_fragments :: menu(3)" class="ui inverted segment stacked m-padding-smaller">
        <div class="ui container">
            <div class="ui inverted secondary stacked menu">
                <h2 class="ui teal header item">Blog</h2>
                <a href="#" class="item"><i class="mini home icon"></i> 首页</a>
                <a href="#" class="item"><i class="mini idea icon"></i> 分类</a>
                <a href="#" class="item"><i class="mini tag icon"></i> 标签</a>
                <a href="#" class="item"><i class="mini clone icon"></i> 归档</a>
                <a href="#" class="item"><i class="mini info icon"></i> 关于我</a>
                <div class="right item">
                    <div class="ui icon input">
                        <input type="text" placeholder="search...">
                        <i class="search link icon"></i>
                    </div>
                </div>
            </div>
        </div>
    </nav>
    <!-- 首页 -->

    <!--    中间部分-->
    <div class="m-padding-big m-container-small">
        <div class="ui container">
            <div class="ui top attached segment">
                <div class="ui middle aligned two column grid">
                    <div class="column">
                        <h3 class="ui teal header">标签</h3>
                    </div>
                    <div class="right aligned column">
                        共 <h2 class="ui orange header m-text-thin" style="display: inline-block" th:text="${#arrays.length(tags)}"> 14 </h2> 篇
                    </div>
                </div>
            </div>
        </div>
        <div class="ui teal segment attached massive">
            <div class="ui labeled button m-margin-tiny" th:each="tag: ${tags}" style="margin-top: 0.3em; margin-bottom: 0.3em">
                <a href="#" th:href="@{/tags/{id}(id=${tag.id})}" class="ui basic left pointing label m-margin-tiny large" th:classappend="${tag.id == activeTagId} ? 'teal'" style="margin-top: 0.3em; margin-bottom: 0.3em">
                    <span th:text="${tag.name}">计算机网络</span> <div class="detail" th:text="${#arrays.length(tag.blogs)}">13</div>
                </a>
            </div>
        </div>
        <div class="ui attached segment">
            <div class="ui m-padding vertical segment m-padding-big" th:each="blog : ${page.content}">
                <div class="ui middle aligned grid" th:if="${blog.published}">
                    <!-- 左边正文 -->
                    <div class="eleven wide column">
                        <h3 class="ui header"><a target="_blank" href="#" th:href="@{/blog/{id} (id=${blog.id}) }" class="m-black" th:text="${blog.title}"></a></h3>
                        <p class="m-text" th:text="${blog.description}"></p>
                        <!-- 底层图标 -->
                        <div class="ui grid">
                            <div class="row">
                                <div class="eleven wide column">
                                    <div class="ui mini horizontal link list">
                                        <div class="item">
                                            <img src="../static/images/green.jpg" th:src="@{${blog.user.avatar}}" alt="" class="ui avatar image m-size-icon-small">
                                            <div class="content">
                                                <a class="header teal" th:text="${blog.user.nickname}">刘军民</a>
                                            </div>
                                            <div class="item m-padding-left-small" style="display: inline-block">
                                                <i class="calendar icon"></i> <span th:text="${#dates.format(blog.updateTime,'yyyy-MM-dd')}"></span>
                                            </div>
                                            <div class="item m-padding-left-small" style="display: inline-block">
                                                &ensp;<i class="eye icon"></i> <span th:text="${blog.views}"></span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="right aligned five wide column">
                                    <a href="#" target="_blank" class="ui teal basic label" th:text="${blog.type.name}">认证升级</a>
                                </div>
                            </div>
                            <div class="row">
                                <div class="column">
                                    <a href="#" th:href="@{/tags/{id}(id=${tag.id})}" class="ui basic left pointing label m-padding-tiny m-text-thin" th:classappend="${tag.id == activeTagId} ? 'teal'" th:each="tag: ${blog.tags}" th:text="${tag.name}"></a>
                                </div>
                            </div>
                        </div>
                        <!-- 底层图片 -->
                    </div>
                    <!-- 左边正文 -->
                    <!-- 右边图片 -->
                    <div class="ui five wide column center aligned">
                        <a class="center aligned" href="#" target="_blank" th:href="@{/blog/{id} (id=${blog.id}) }">
                            <img style="height: 150px;width: 200px;" src="../static/images/green.jpg" th:src="@{${blog.firstPicture}}" alt="" class="ui center aligned rounded image m-size-icon-large">
                        </a>
                    </div>
                    <!-- 右边图片 -->
                </div>
            </div>
        </div>
        <!-- content -->
        <!-- foot -->
        <div class="ui bottom attached segment" th:if="${page.totalPages} > 1">
            <div class="ui middle aligned two column grid">
                <div class="column">
                    <a href="#" th:href="@{/(page=${page.number}-1)}" th:unless="${page.first}" class="ui mini teal basic button">上一页</a>
                </div>
                <div class="right aligned column">
                    <a href="#" th:href="@{/(page=${page.number}+1)}" th:unless="${page.last}" class="ui mini teal basic button">下一页</a>
                </div>
            </div>
        </div>
    </div>
    <!-- 中间部分 -->


    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>

    <!--    底部-->
    <footer th:replace="_fragments :: footer" class="ui inverted vertical segment m-padding-large">
        <div class="ui center aligned container">
            <div class="ui inverted divided grid">
                <div class="three wide column">
                    <div class="item">
                        <img src="../static/images/WeChat.png" class="ui rounded image" alt="" style="width: 100px">
                    </div>
                </div>
                <div class="three wide column">
                    <h4 class="ui inverted header">最新项目</h4>
                    <div class="ui inverted link list">
                        <a href="#" class="item">最新项目</a>
                        <a href="#" class="item">最新项目</a>
                        <a href="#" class="item">最新项目</a>
                    </div>
                </div>
                <div class="three wide column">
                    <h4 class="ui inverted header">联系我</h4>
                    <div class="ui inverted link list">
                        <a href="#" class="item">Email:1792619448@qq.com</a>
                        <a href="#" class="item">QQ:1792619448</a>
                        <a href="https://github.com/liujunminx" class="item">GitHub-></a>
                    </div>
                </div>
                <div class="seven wide column">
                    <h4 class="ui inverted header">关于博客</h4>
                    <div class="ui inverted link list">
                        <p class="m-text-thin m-text-spaced m-opacity-mini">这是我的个人博客，分享自己学习历程中的笔记，项目，感想，希望能和大家交流学习</p>
                    </div>
                </div>
            </div>
            <div class="ui inverted divider section"></div>
            <p class="m-text-thin m-text-spaced m-opacity-mini">Copyright © 2019 Lemon Designed by Liu JunMin</p>
        </div>
    </footer>

    <span th:replace="_fragments::script"> </span>

</body>
</html>